package com.usian.skill.mq;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName: MQConfig
 * Author:   WGG
 * Date:    2022-12-2022/12/13-19:50
 * Version: 1.0
 * Description:
 */
@Configuration
public class MQConfig {
    public static final String QUEUE = "queue"; //声明队列的名称
    public static final String SKILLQUEUE = "skillQueue"; //声明队列的名称

    //跟进队列的名称指定交换模式
    /**
     * Direct模式 交换机Exchange
     * @return
     */
    @Bean
    public Queue queue(){
        return new Queue(QUEUE,true);
    }
    @Bean
    public Queue skillQueue(){
        return new Queue(SKILLQUEUE,true);
    }
}
